package cn.stylefeng.guns.modular.business.frequency.cmcompanyorder.entity;

import cn.stylefeng.guns.core.pojo.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 通讯录联系人表
 *
 * @author yujie
 * @date 2023/05/09 17:17
 */
@Data
@TableName("cm_company_order")
public class CmCompanyOrder  {

    /**
     * id
     */
    @TableId("id")
    private Long id;
    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 创建人
     */
    @TableField(value = "create_user",fill = FieldFill.INSERT)
    private Long createUser;

    public CmCompanyOrder(Long companyId, Long linkmanId, Long orderId, Integer type, BigDecimal fee, Long assignUser, Date assignTime, String driverName, String driverPhone, Long tenantId) {
        this.companyId = companyId;
        this.linkmanId = linkmanId;
        this.orderId = orderId;
        this.type = type;
        this.fee = fee;
        this.assignUser = assignUser;
        this.assignTime = assignTime;
        this.driverName = driverName;
        this.driverPhone = driverPhone;
        this.tenantId = tenantId;
    }

    public CmCompanyOrder() {
    }

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 更新人
     */
    @TableField(value = "update_user",fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;


    /**
     * 供应商ID
     */
    @TableField("company_id")
    private Long companyId;

    /**
     * 通讯录ID
     */
    @TableField("linkman_id")
    private Long linkmanId;

    /**
     * 订单ID
     */
    @TableField("order_id")
    private Long orderId;

    /**
     * 类型 1.下单 2.提车 3.发运 4.送车
     */
    @TableField("type")
    private Integer type;

    /**
     * 金额
     */
    @TableField("fee")
    private BigDecimal fee;

    /**
     * 指派人
     */
    @TableField("assign_user")
    private Long assignUser;

    /**
     * 指派时间
     */
    @TableField("assign_time")
    private Date assignTime;

    /**
     * 司机姓名
     */
    @TableField("driver_name")
    private String driverName;

    /**
     * 司机电话
     */
    @TableField("driver_phone")
    private String driverPhone;

    /**
     * 租户ID
     */
    @TableField(value = "tenant_id",fill = FieldFill.INSERT)
    private Long tenantId;
}
